.sky{
  position: relative;
  background: skyblue;
  height: 100vh;
  display: flex;
  transition: .4s all ease-in-out;

  &.sky__night{
    background: #222029;
  }

  label{
    cursor: pointer;
  }

  .wrapper{
    position: absolute;
    top: 80px;
    right: 150px;

    #check{
      position: absolute;
      transform: scale(0);
      opacity: 0;
    }

    .sun-and-moon{
      position: relative;
      border-radius: 100%;
      width: 100px;
      height: 100px;
      background: rgb(244, 220, 66);
      box-shadow: 0 0 10px 10px rgba(244, 220, 66, 1),
      0 0 20px 40px rgba(244, 220, 66, .6),
      0 0 30px 70px rgba(244, 220, 66, .4),
      0 0 40px 110px rgba(244, 220, 66, .2);
      transition: .6s all cubic-bezier(.75,-0.5,0,1.75);
    }

    .sun-and-moon:after{
      position: absolute;
      content: '';
      background: #222029;
      border-radius: 100%;
      width: 80px;
      height: 80px;
      left: -5px;
      top: 10px;
      transform: scale(0);
      opacity: 0;
      transform-origin: right center;
      transition: .6s all cubic-bezier(.75,-0.5,0,1.75);
    }

    #check:checked + .sun-and-moon{
      background: rgb(244, 235, 198);
      box-shadow: 0 0 0 0 rgba(244, 220, 66, 1),
      0 0 0 0 rgba(244, 220, 66, .6),
      0 0 0 0 rgba(244, 220, 66, .4),
      0 0 0 0 rgba(244, 220, 66, .2);
    }

    #check:checked + .sun-and-moon:after{
      transition-delay: 0;
      transform: scale(1);
      background: #222029;
      opacity: 1;
    }
  }

  .stars-1, .stars-2, .stars-3, .stars-4{
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgb(244, 235, 198);
    border-radius: 5px;
    box-shadow: 0 0 0 4px rgba(244, 235, 198, .1),
    0 0 0 8px rgba(244, 235, 198, .05),
    0 0 0 12px rgba(244, 235, 198, .025);
    opacity: 0;
    transition: .6s all cubic-bezier(.75,-0.5,0,1.75);

    &:after, &:before{
      position: absolute;
      content: '';
      width: 2px;
      height: 2px;
      background: rgb(244, 235, 198);
      border-radius: 5px;
      box-shadow: 0 0 0 4px rgba(244, 235, 198, .1),
      0 0 0 8px rgba(244, 235, 198, .05),
      0 0 0 12px rgba(244, 235, 198, .025);
    }
  }

  .stars-1{
    top: 10%;
    left: 12%;

    &:after{
      top: 331px;
      right: 67px;
    }

    &:before{
      top: 412px;
      left: 100px;
    }
  }

  .stars-2{
    top: 30%;
    left: 52%;

    &:after{
      top: 564px;
      right: 37px;
    }

    &:before{
      top: 412px;
      left: 20px;
    }
  }

  .stars-3{
    top: 24%;
    right: 12%;

    &:after{
      top: 123px;
      right: 337px;
    }

    &:before{
      top: 412px;
      right: 50px;
    }
  }

  .stars-4{
    top: 33%;
    right: 62%;

    &:after{
      top: -100px;
      right: 154px;
    }

    &:before{
      top: 311px;
      left: 200px;
    }
  }

  .stars__night{
    opacity: 1;
  }
}








// 龙猫部分的css
$g: #bbb;
$b: #222;
$y: #ffffff;
$gr: #a6cd52;
.longmao-box{
  position: absolute;
  bottom: 100px;
  left: 100px;
  perspective: 600px;
  * {
    transform-style: preserve-3d;
  }
}
.longmao-wrap {
  width: 275px;
  height: 100px;
  position: relative;
  box-shadow: 0 0 0 2px #eee, 0 0 40px 0px rgba(0, 0, 0, 0.15);
  border-radius: 500px;
  background: #fff;
  * {
    transition: 0.25s linear;
  }
  .totoro {
    position: absolute;
    width: 100px;
    height: 150px;
    left: 0px;
    top: -30px;
    background: $g;
    // 身子灰色部分
    border-radius: 170px 170px 100px 100px / 300px 300px 200px 200px;
    z-index: 2;

    .ears {
      position: absolute;
      width: 90%;
      height: 40px;
      left: 5%;
      .ear {
        position: absolute;
        width: 10px;
        height: 25px;
        background: $g;
        top: -10px;
        left: 7.5px;
        border-radius: 700px 700px 500px 500px / 2750px 2750px 500px 500px;
        &:after {
          content: "";
          position: absolute;
          width: 4px;
          height: 15px;
          background: $g;
          left: calc(50% - 2px);
          bottom: -15px;
        }
        &:nth-of-type(2) {
          left: auto;
          right: 7.5px;
        }
      }
    }
    .foot {
      width: 40px;
      height: 20px;
      background: $g;
      position: absolute;
      bottom: 0;
      left: 5px;
      border-radius: 300px 200px 200px 200px / 200px 100px 100px 100px;
      transform-origin: top right;
      transform: rotate(0deg) scaleY(1) scaleX(1);
      &.two {
        left: auto;
        right: 5px;
        transform-origin: top left;
        border-radius: 200px 300px 200px 200px / 100px 200px 100px 100px;
      }
    }
    .arm {
      width: 25px;
      height: 60px;
      background: $g;
      position: absolute;
      left: 0px;
      z-index: -1;
      top: 50px;
      border-radius: 550px 100px 400px 400px / 700px 200px 600px 800px;
      transform: rotate(10deg);
      transform-origin: top right;
      &:nth-of-type(2) {
        left: auto;
        right: 0px;
        border-radius: 100px 550px 400px 400px / 200px 700px 800px 600px;
        transform: rotate(-10deg);
        transform-origin: top left;
      }
    }
    .body {
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 170px 170px 100px 100px / 300px 300px 200px 200px;
      left: 0;
      top: 0;
      overflow: hidden;
      z-index: 2;
      .spots {
        position: absolute;
        width: 90%;
        height: 57.5%;
        background: $y;
        bottom: 10px;
        left: 5%;
        border-radius: 300px 300px 300px 300px / 300px 300px 500px 500px;
        .spot {
          content: "";
          position: absolute;
          width: 15px;
          height: 15px;
          border-radius: 50px;
          box-shadow: 0 -5px 0 darken($g, 20%);
          left: calc(50% - 6.5px);
          top: 10px;
          transform: translateZ(20px) scaleX(0.75) scale(0.75);
          &:nth-of-type(2),
          &:nth-of-type(3) {
            top: 15px;
            left: calc(50% - 25px);
          }
          &:nth-of-type(3) {
            left: calc(50% + 10px);
          }
          &:nth-of-type(n + 4) {
            top: 30px;
            left: 10px;
          }
          &:nth-of-type(5) {
            left: 30px;
          }
          &:nth-of-type(6) {
            left: 50px;
          }
          &:nth-of-type(7) {
            left: 70px;
          }
          &:before,
          &:after {
            content: "";
            position: absolute;
            width: 5px;
            height: 10px;
            background: darken($g, 20%);
            border-radius: 200%;
            left: -2.5px;
            transform: rotate(45deg);
            bottom: 10px;
          }
          &:after {
            transform: rotate(-45deg);
            left: 10px;
          }
        }
      }
      .inner {
        position: absolute;
        width: 100%;
        height: 30px;
        top: 15px;
        &:before {
          content: "";
          position: absolute;
          width: 17.5px;
          height: 6px;
          background: #222;
          left: calc(50% - 8.75px);
          top: 10px;
          border-radius: 200px 200px 100px 100px / 100px 100px 50px 50px;
        }
        .mouth {
          position: absolute;
          width: 50px;
          height: 10px;
          background: repeating-linear-gradient(
                          to right,
                          #fff,
                          #fff 10px,
                          #222 10px,
                          #222 11px,
                          #fff 11px
          );
          bottom: 0px;
          left: calc(50% - 25px);
          border-radius: 25px 25px 300px 300px / 25px 25px 200px 200px;
          box-shadow: inset 0 0 0 1px darken($g, 10%);
        }
        .eye {
          position: absolute;
          top: 5px;
          width: 12.5px;
          height: 12.5px;
          background: $b;
          left: 20px;
          border-radius: 100%;
          box-shadow: inset 0 0 0 1px darken($g, 10%), inset 0 0 0 4.5px #fff;
          &:nth-of-type(2) {
            left: auto;
            right: 20px;
          }
        }
      }
    }
  }
  input {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 999;
    opacity: 0;
    &:checked {
      & ~ .totoro {
        transform: translateX(180px) translateY(-5px);
        transition: 0.5s linear;
        &:before {
          opacity: 1;
        }
        &:after {
          opacity: 0.25;
        }
        * {
          transition: 0.5s linear;
        }
        .foot {
          transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
          transition-delay: 0.45s, 0.45s;
          transform: rotate(-75deg) scaleY(1.5) scaleX(1.5) translateY(-10px)
          translateX(10px);
          &.two {
            transform: rotate(75deg) scaleY(1.5) scaleX(1.5)
            translateY(-10px) translateX(-10px);
          }
        }
        .arm {
          transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
          transition-delay: 0.45s, 0.45s;
          transform: rotate(40deg) translateX(7.5px);
          &:nth-of-type(2) {
            transform: rotate(-40deg) translateX(-7.5px);
          }
        }
        .ears {
          .ear {
            left: 70px;
            animation: ear1 1s ease-in-out infinite alternate;
            transform-origin: -20% 120%;
            @keyframes ear1 {
              to {
                transform: rotate(5deg) translateY(-2.5px);
              }
            }
            &:nth-of-type(2) {
              left: auto;
              right: 70px;
              animation: ear2 1s ease-in-out infinite alternate;
              transform-origin: 120% 120%;
              @keyframes ear2 {
                to {
                  transform: rotate(-5deg) translateY(-2.5px);
                }
              }
            }
          }
        }
        .body {
          .mouth {
            box-shadow: inset 0 0 0 2px darken($g, 35%);
            height: 2px;
            bottom: 2.5px;
            width: 20px;
            left: calc(50% - 10px);
          }
          .spots {
            &:before {
              animation: breathe2 1s ease-in-out infinite alternate;
              transform-origin: bottom;
              @keyframes breathe2 {
                to {
                  transform: scale(1.025);
                }
              }
            }
          }
          .inner{
            &:before{
              animation:shake 3s ease-in-out infinite;
              @keyframes shake{
                90%{
                  transform:translateX(0px);
                }
                91%{
                  transform:translateX(1px);
                }
                92%{
                  transform:translateX(0px);
                }
                93%{
                  transform:translateX(-1px);
                }
                94%{
                  transform:translateX(0px);
                }
              }
            }
          }
          .inner,
          .spots {
            .spot {
              animation: breathe 1s ease-in-out infinite alternate;
              @keyframes breathe {
                to {
                  transform: translateZ(20px) scaleX(0.8) scale(0.75)
                  translateY(-5px) rotateX(-20deg);
                }
              }
            }
            .eye {
              box-shadow: inset 0 0 0 1px darken($g, 35%),
              inset 0 0 0 4.5px #fff;
              height: 2px;
              width: 7.5px;
              transform: translateX(7.5px);
              &:nth-of-type(2) {
                transform: translateX(-7.5px);
              }
            }
            animation: roll1 0.5s linear 1 forwards;
            @keyframes roll1 {
              0% {
                transform: translateX(0%);
              }
              50% {
                transform: translateX(100%) rotateY(150deg);
              }
              50.001% {
                transform: translateX(-100%) rotateY(-150deg);
              }
              100% {
                transform: translateX(0%);
              }
            }
          }
        }
      }
    }
  }
}


// house
.house-box{
  position: absolute;
  bottom: 0;
  *, *:before, *:after {
    box-sizing: border-box;
    position: relative; // don't @ me
  }

  *:before, *:after {
    content: '';
    display: block;
  }
}
$color-primary: #224889;
$color-roof: #A6CFFF;
$color-ledge: #79AAFF;
$color-window-left: #65EBFF;
$color-window-right: #71FBFF;
$color-window: linear-gradient(to right, $color-window-left, $color-window-left 49.9%, $color-window-right 50%, $color-window-right);
$color-shadow: #E1EAFF;
$duration: 500ms;
$delay: 70ms;
$easing: cubic-bezier(.1, 0, .3, 1);

$parts: (
        6: (
                wings: 825px,
                front: 350px,
        ),
        5: (
                wings: 355px,
                front: 150px,
        ),
        4: (
                wings: 300px,
                front: 125px,
        ),
        3: (
                wings: 240px,
                front: 150px,
        ),
);

@each $rooms, $dimensions in $parts {
  [data-rooms="#{$rooms}"] {
    @each $part, $width in $dimensions {
      .house-#{$part} {
        width: $width;
        left: calc(50% - #{$width / 2});
      }
      #{--#{$part}-width}: $width;
    }
  }
}


.house {
  height: 625px;
  width: 920px;
}

.house-wings {
  position: absolute;
  bottom: 0;
  height: 375px;

  &:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border: 5px solid $color-primary;
    box-shadow: inset 0 15px $color-shadow;
  }

  &:after {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background-color: $color-primary;
    transform: scaleX(1.2)
  }

  > .house-roof {
    height: 165px;
    width: calc(100% + 40px);
    left: -20px;
    border-bottom: 5px solid $color-primary;
    position: absolute;
    bottom: 100%;

    &:before, &:after {
      position: absolute;
      height: 100%;
      width: 50%;
      background-color: $color-roof;
      border: 5px solid $color-primary;
      border-bottom: none;
    }

    &:before {
      left: 0;
      transform-origin: bottom left;
      transform: skewX(-30deg);
      border-right: none;
    }
    &:after {
      right: 0;
      transform-origin: bottom right;
      transform: skewX(30deg);
      border-left: none;
    }
  }

  .house-ledge {
    position: absolute;
    bottom: -15px;
    width: 100%;
    height: 15px;
    border: 5px solid $color-primary;
    background-color: $color-ledge;
  }
}


$wing-roof-moves: (
        6: (
                (origin: bottom left, transform: translateY(-10px) rotate(-5deg)),
                (origin: bottom right, transform: translateY(-5px) rotate(2deg)),
        ),
        5: (
                (origin: bottom right, transform: translateY(-20px) rotate(10deg)),
                (origin: bottom left, transform: translateY(-10px) rotate(-2deg)),
        ),
        4: (
                (origin: bottom left, transform: translateY(-15px) rotate(-10deg)),
                (origin: bottom right, transform: translateY(-10px) rotate(2deg)),
        ),
        3: (
                (origin: bottom right, transform: translateY(-20px) rotate(10deg)),
                (origin: bottom left, transform: translateY(-10px) rotate(-2deg)),
        ),
);

$front-roof-moves: (
        6: (
                (origin: bottom right, transform: translateY(-5px) rotate(5deg)),
                (origin: bottom left, transform: translateY(-2px) rotate(-1deg)),
        ),
        5: (
                (origin: bottom left, transform: translateY(-10px) rotate(-5deg)),
                (origin: bottom right, transform: translateY(-5px) rotate(1deg)),
        ),
        4: (
                (origin: bottom right, transform: translateY(-5px) rotate(10deg)),
                (origin: bottom left, transform: translateY(-2px) rotate(-2deg)),
        ),
        3: (
                (origin: bottom right, transform: translateY(-10px) rotate(-5deg)),
                (origin: bottom left, transform: translateY(-5px) rotate(2deg)),
        ),
);

$house-moves: (
        6: (
                (transform: scale(.95, 1.05)),
                (transform: scale(.98, 1.02)),
        ),
        5: (
                (transform: scale(.9, 1.2)),
                (transform: scale(.95, 1.05)),
        ),
        4: (
                (transform: scale(.9, 1.2)),
                (transform: scale(.95, 1.05)),
        ),
        3: (
                (transform: scale(.9, 1.2)),
                (transform: scale(.95, 1.05)),
        ),
);

$facade-moves: (
        6: (
                (transform: scale(.95, 1.05)),
                (transform: scale(.98, 1.02)),
        ),
        5: (
                (transform: scale(.9, 1.05)),
                (transform: scale(.95, 1.02)),
        ),
        4: (
                (transform: scale(.9, 1.05)),
                (transform: scale(.95, 1.02)),
        ),
        3: (
                (transform: scale(.9, 1.05)),
                (transform: scale(.95, 1.02)),
        ),
);

$chimney-moves: (
        6: (
                (transform: rotate(10deg) translateY(-15px)),
                (transform: rotate(-5deg) translateY(-5px)),
        ),
        5: (
                (transform: rotate(-10deg) translateY(-15px)),
                (transform: rotate(5deg) translateY(-5px)),
        ),
        4: (
                (transform: rotate(10deg) translateY(-15px)),
                (transform: rotate(-5deg) translateY(-5px)),
        ),
        3: (
                (transform: rotate(-10deg) translateY(-15px)),
                (transform: rotate(5deg) translateY(-5px)),
        ),
);

$move-parts: (
        wing-roof: $wing-roof-moves,
        front-roof: $front-roof-moves,
        house: $house-moves,
        facade: $facade-moves,
        chimney: $chimney-moves,
);

@function either($a, $b) {
  @return if($a, $a, $b);
}

@each $part, $move-config in $move-parts {
  @each $rooms, $moves in $move-config {
    $move-1: nth($moves, 1);
    $move-2: nth($moves, 2);
    @keyframes #{$part}-#{$rooms}-move {
      from {
        transform-origin: either(map-get($move-1, origin), bottom center);
      }
      25% {
        transform: map-get($move-1, transform);
      }
      50% {
        transform-origin: either(map-get($move-1, origin), bottom center);
        transform: none;
      }
      51% {
        transform-origin: either(map-get($move-2, origin), bottom center);
      }
      75% {
        transform-origin: either(map-get($move-2, origin), bottom center);
        transform: map-get($move-2, transform);
      }
      to {
        transform-origin: either(map-get($move-2, origin), bottom center);
        transform: none;
      }
    }
  }
}

@for $i from 6 through 3 {
  [data-rooms="#{$i}"] {
    .house-wings > .house-roof {
      animation: wing-roof-#{$i}-move $duration $delay $easing;
    }
    .house-front > .house-gable {
      animation: front-roof-#{$i}-move $duration $delay $easing;
    }
    .house-wings:before,
    .house-left-wing,
    .house-right-wing {
      animation: house-#{$i}-move $duration $delay $easing;
    }
    .house-facade,
    .house-front .house-window,
    .house-doorway {
      animation: facade-#{$i}-move $duration $delay $easing;
    }
    .house-chimney {
      animation: chimney-#{$i}-move $duration $delay $easing;
    }
  }
}


.house-front {
  position: absolute;
  bottom: 0;
  height: 450px;

  > .house-window {
    width: 250px;
    height: 200px;
    position: absolute;
    left: calc(50% - 125px);
    top: -10px;

    .house-sparkle {
      display: block;
    }
  }

  .house-ledge {
    height: 20px;
    width: 20px;
    position: absolute;
    background: #000;
    left: calc(50% - 10px);
    background-color: $color-ledge;
    border: 5px solid $color-primary;
    transform: rotate(-45deg) translate(5px, -5px);

    &:before, &:after {
      position: absolute;
      width: calc(var(--front-width) / 1.25);
      height: calc(100% + 10px);
      top: -5px;
      background-color: $color-ledge;
      border: 5px solid $color-primary;
    }

    &:before {
      right: 100%;
      border-right: none;
    }
    &:after {
      left: 0;
      transform-origin: left bottom;
      transform: rotate(90deg) translate(-5px, 5px);
      border-left: none;
    }

  }
}
// 屋檐
.house-gable {
  position: absolute;
  bottom: calc(100% + 82px);
  left: 0;
  width: 100%;
  height: 70px;

  > .house-roof {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleY(0.8);
    z-index: 1;
  }
}

// 烟囱
.house-chimney {
  width: 55px;
  height: 120px;
  position: absolute;
  background-color: $color-primary;
  left: 15px;
  bottom: 100%;
  z-index: 0;
}

.house-facade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 15px 0 rgba(darken($color-shadow, 20%), 0.2);

  &:before, &:after {
    position: absolute;
    height: 100%;
    width: 50%;
    background-color: #fff;
    top: 0;
    border-top: 5px solid $color-primary;
    box-shadow: inset 0 calc(var(--front-width) / 6) $color-shadow;
  }

  &:before {
    left: 0;
    transform-origin: top left;
    transform: skewY(-40deg);
    border-left: 5px solid $color-primary;
  }

  &:after {
    right: 0;
    transform-origin: top right;
    transform: skewY(40deg);
    border-right: 5px solid $color-primary;
  }
}

.house-doorway {
  width: 165px;
  height: 190px;
  position: absolute;
  bottom: 0;
  left: calc(50% - 165px / 2);

  .house-stairs {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    height: 15px;
    border: 5px solid $color-primary;
    z-index: 0;
    box-shadow: 5px -5px $color-shadow;

    &, &:before, &:after {
      background-color: white;
    }

    &:before, &:after {
      box-shadow: 5px -5px $color-shadow;
      position: absolute;
      height: 15px;
      width: 100%;
      border: 5px solid $color-primary;
    }

    &:before {
      bottom: 100%;
      transform: scaleX(.9);
      z-index: 0;
    }

    &:after {
      bottom: calc(200% + 5px);
      transform: scaleX(.75);
      z-index: 0;
    }
  }
  .house-door {
    position: absolute;
    background-color: $color-primary;
    width: 50%;
    height: 155px;
    left: 25%;
    bottom: 35px;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
  }
}

.house-wings {
  .house[data-rooms="6"] & {
    .house-sparkle {
      display: block;
    }
  }
}

.house-left-wing,
.house-right-wing {
  position: absolute;
  height: 100%;
  width: calc(50% - var(--front-width) / 2);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.house-left-wing {
  left: 0;
}

.house-right-wing {
  right: 0;
  flex-flow: row-reverse;
}

.house-sparkle {
  position: absolute;
  height: 90px;
  width: 90px;
  border-radius: 50%;
  border: 5px solid $color-primary;
  top: calc(50% - 45px);
  left: calc(50% - 45px);
  display: none;
  // animation-iteration-count: infinite !important;

  &:before {
    top: 0;
    left: 0;
    background-color: $color-window-left;
  }

  &:after {
    bottom: 0;
    right: 0;
    background-color: $color-primary;
  }
}

.house-sparkle,
.house-sparkle-dots {
  &:before, &:after {
    position: absolute;
    height: 10px;
    width: 10px;
    border-radius: 50%;
  }
}

.house-sparkle-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  &:before {
    bottom: -15px;
    right: 40px;
    background-color: $color-roof;
  }
}

.house[data-rooms="6"] {
  .house-left-wing .house-sparkle {
    left: calc(25% - 45px);
  }
  .house-right-wing .house-sparkle {
    left: initial;
    right: calc(25% - 45px);
  }
}

@each $rooms in 6 5 4 3 {
  @keyframes sparkle-#{$rooms} {
    from {
      transform: scale(1);
      opacity: 1;
    }
    to {
      transform: scale(2);
      opacity: 0;
      border-width: 0;
    }
  }

  @keyframes sparkle-dots-#{$rooms} {
    from {
      transform: scale(1);
    }
    to {
      transform: scale(0);
    }
  }

  .house[data-rooms="#{$rooms}"] {
    .house-sparkle {
      animation: sparkle-#{$rooms} $duration $easing both;
    }

    .house-sparkle,
    .house-sparkle-dots {
      &:before, &:after {
        animation: sparkle-dots-#{$rooms} $duration $easing both;
      }
    }
  }
}

.house-window {
  height: 160px;
  width: 70px;
  border: 5px solid $color-primary;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  background-image: $color-window;

  &:before {
    height: 100%;
    width: 5px;
    left: calc(50% - 2.5px);
    top: 0;
    background-color: $color-primary;
  }

  &:after {
    height: 15px;
    width: calc(100% + 20px);
    left: -10px;
    bottom: 5px;
    border-radius: 15px;
    background-color: $color-ledge;
    border: 5px solid $color-primary;
    box-shadow: 0 5px $color-shadow;
  }
}


// 灯泡
.lightbulb-container {
  width: 200px;
  position: absolute;
  top: 0;
  left: 20%;
}

input[type=checkbox] {
  opacity: 0; /* Hides the checkbox */
}
label {
  cursor: pointer;
}
#lightbulb{
  width: 80px;
  height: 80px;
  background-image: url("../imgs/light.svg");
  position: absolute;
  top: 10px;
  transform: rotate(180deg);

  //&:after{
  //  width: 30px;
  //  height: 30px;
  //  border-radius: 15px;
  //  position: absolute;
  //  background: #f4dc42;
  //  box-shadow: 0 0 10px 10px #f4dc42;
  //}
}

.outer-switch {
  border: 3px solid #323232;
  border-radius: 3px;
  height: 46px;
  width: 25px;
  margin-left: 100px;
}

.inner-switch {
  border: 3px solid #323232;
  border-bottom: 8px solid #323232;
  border-radius: 3px;
  height: 31px;
  width: 17px;
  margin: auto;
  margin-top: 6px;
  background-image: linear-gradient(#ffffff, #e8e8e8, #ffffff);
  transition: ease-in 0.1s;
}

input[type=checkbox]:checked ~ #lightbulb{
  background-image: url("../imgs/light-on.svg");
}
input[type=checkbox]:checked ~ label .outer-switch .inner-switch {
  border-top: 8px solid #323232;
  border-bottom: 3px solid #323232;
  background-image: linear-gradient(#e8e8e8, #ffffff);
}